/**
 * Project Name:meatball-core
 * File Name:FileServiceImpl.java
 * Package Name:com.meatball.base.system.file.service.impl
 * Date:2018年4月4日上午11:09:16
 * Copyright (c) 2018, zhang.xiangyu@foxmail.com All Rights Reserved.
*/
package com.meatball.base.system.file.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.meatball.base.system.file.dao.FileMapper;
import com.meatball.base.system.file.model.File;
import com.meatball.base.system.file.service.FileService;

/**   
 * @Title: FileServiceImpl.java 
 * @Package com.meatball.base.system.file.service.impl
 * @Description: TODO(用一句话描述该文件做什么) 
 * @author zk  
 * @date 2018年4月4日 上午11:09:16 
 * @version V1.0   
 */
@Service
public class FileServiceImpl implements FileService {
	
	@Resource
	FileMapper fileMapper;
	/**
	 * @Title: info 
	 * @Description: TODO(附件详情) 
	 * @param bId 附件id
	 * @return
	 * @return File    返回类型
	 */
	public File info(Long bId){
		
		return fileMapper.selectByPrimaryKey(bId);
	}
	
	/**
	 * @Title: add 
	 * @Description: TODO(新增附件) 
	 * @param entity 附件信息
	 * @return
	 * @return int    返回类型
	 */
	public int add(File entity){
		
		return fileMapper.insertSelective(entity);
	}
	
	/**
	 * @Title: edit 
	 * @Description: TODO(附件更新) 
	 * @param entity 附件信息
	 * @return
	 * @return int    返回类型
	 */
	public int edit(File entity){
		
		return fileMapper.updateByPrimaryKeySelective(entity);
	}
	
	/**
	 * @Title: selectByFid 
	 * @Description: TODO(附件查询) 
	 * @param bFid 关联id
	 * @return
	 * @return List<File>    返回类型
	 */
	public List<File> selectByFid(Long bFid){
		
		return fileMapper.selectByFid(bFid);
	}

	/**
	 * @Title: listParams 
	 * @Description: TODO(附件查询) 
	 * @param entity 附件信息
	 * @return
	 * @return List<File>    返回类型
	 */
	public List<File> listParams(File entity) {

		return null;
	}

}
